package com.healthy.education.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.education.mapper.UserLearningProgressMapper;
import com.healthy.education.domain.UserLearningProgress;
import com.healthy.education.service.IUserLearningProgressService;

/**
 * 学习进度记录Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class UserLearningProgressServiceImpl implements IUserLearningProgressService 
{
    @Autowired
    private UserLearningProgressMapper userLearningProgressMapper;

    /**
     * 查询学习进度记录
     * 
     * @param id 学习进度记录主键
     * @return 学习进度记录
     */
    @Override
    public UserLearningProgress selectUserLearningProgressById(Long id)
    {
        return userLearningProgressMapper.selectUserLearningProgressById(id);
    }

    /**
     * 查询学习进度记录列表
     * 
     * @param userLearningProgress 学习进度记录
     * @return 学习进度记录
     */
    @Override
    public List<UserLearningProgress> selectUserLearningProgressList(UserLearningProgress userLearningProgress)
    {
        return userLearningProgressMapper.selectUserLearningProgressList(userLearningProgress);
    }

    /**
     * 新增学习进度记录
     * 
     * @param userLearningProgress 学习进度记录
     * @return 结果
     */
    @Override
    public int insertUserLearningProgress(UserLearningProgress userLearningProgress)
    {
        return userLearningProgressMapper.insertUserLearningProgress(userLearningProgress);
    }

    /**
     * 修改学习进度记录
     * 
     * @param userLearningProgress 学习进度记录
     * @return 结果
     */
    @Override
    public int updateUserLearningProgress(UserLearningProgress userLearningProgress)
    {
        return userLearningProgressMapper.updateUserLearningProgress(userLearningProgress);
    }

    /**
     * 批量删除学习进度记录
     * 
     * @param ids 需要删除的学习进度记录主键
     * @return 结果
     */
    @Override
    public int deleteUserLearningProgressByIds(Long[] ids)
    {
        return userLearningProgressMapper.deleteUserLearningProgressByIds(ids);
    }

    /**
     * 删除学习进度记录信息
     * 
     * @param id 学习进度记录主键
     * @return 结果
     */
    @Override
    public int deleteUserLearningProgressById(Long id)
    {
        return userLearningProgressMapper.deleteUserLearningProgressById(id);
    }
}
